package com.arcaneshift.security.errors;

import com.common.security.abstracts.AbstractError;

/**
 * Error code range: 81 - 100
 * 
 * @author Ady
 *
 */
public class UserError extends AbstractError {

	public static final int USER_NOT_FOUND = 81;
	private static final String MESSAGE_USER_NOT_FOUND = "The user with the provided data was not found";
	private static final String CAUSE_USER_NOT_FOUND = "The data provided might be wrong or the user was deleted";
	private static final String DESCRIPTION_USER_NOT_FOUND = "Check your data and try again. If the problem persists, please contact the administratior";
	
	public UserError(int code) {
		super(code);
		
		switch (code) {
			case USER_NOT_FOUND: {
				setMessage(MESSAGE_USER_NOT_FOUND);
				setCause(CAUSE_USER_NOT_FOUND);
				setDescription(DESCRIPTION_USER_NOT_FOUND);
				break;
			}
		}
	}
}
